package com.gsafety.wellsfort.controller.anyineng;

import com.gsafety.wellsfort.common.util.ApiResponse;
import com.gsafety.wellsfort.domain.model.knowledge.ExamPaper;
import com.gsafety.wellsfort.domain.vo.AnYiNengConfVO;
import com.gsafety.wellsfort.service.anyineng.AnYiNengService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(value = "安意能管理",description = "安意能管理接口")
@RestController
@Slf4j
@RequestMapping("/api/anyineng")
public class AnYiNengController {
    @Autowired
    private AnYiNengService anYiNengService;
    @ApiOperation(value="保存安意能配置")
    @PostMapping("/save-config")
    public ApiResponse<AnYiNengConfVO> saveConfig(@RequestBody AnYiNengConfVO anYiNengConfVO){
        return anYiNengService.saveConfig(anYiNengConfVO);
    }


    @ApiOperation(value="获取安意能配置")
    @PostMapping("/get-config")
    public ApiResponse<AnYiNengConfVO> getConfig(){
        return anYiNengService.getConfig();
    }

    @ApiOperation(value="获取安意能试卷")
    @PostMapping("/get-anyinengPaper")
    public ApiResponse<ExamPaper> getAnYiNengExamPapaer(){
        return anYiNengService.getAnYiNengExamPapaer();
    }

}
